package com.mrjy.maintain.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.mrjy.common.entity.UserLearning;
import com.mrjy.maintain.bo.IUserLearningInfoBo;
/**
 * 微信1.6幸福频道
 * 我正在学
 * @author Administrator
 *
 */
@Controller
@RequestMapping("/maintain/userLearningInfo")
public class UserLearningInfoController {
	
	@Resource
	private IUserLearningInfoBo userLearningInfoBo;
	
	/**
	 * 微信1.6
	 * 加载我正在学列表
	 * @param userLearning
	 * @return
	 */
	@RequestMapping("queryUserLearning")
	@ResponseBody
	public Object queryUserLearning(UserLearning userLearning){
		return userLearningInfoBo.queryUserLearning(userLearning);
	}
	
	/**
	 * 添加用户正在学记录
	 * 点击[课程包--开始学习]时调用
	 * @param userLearning
	 * @return
	 */
	@RequestMapping("insert")
	@ResponseBody
	public Object insert(UserLearning userLearning){
		return userLearningInfoBo.txInsert(userLearning);
	}
}
